home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / intuiextend20b.lha / distribution / exemples / appicon.asc < prev    next >
Text File  |  1980-01-08  |  2KB  |  77 lines

  1. '**************************************
  2. '                                     *
  3. '     IntuiExtend.Lib 2.0/@1995-98    *
  4. '                                     *
  5. '          by CIERP Philippe.         *
  6. '                                     *
  7. '          from AMIGAzette 83         *
  8. '                                     *
  9. '**************************************
  10. '
  11. ' Command
  12. '  -Wb Create Msgport    
  13. '  -Wb Get Deficon     
  14. '  -App Create Icon      
  15. '  -Wb Get Msg     
  16. '  -App Get Numarg     
  17. '  -App Get Arglist    
  18. '  -Wb Reply Msg     
  19. '  -App Free Icon      
  20. '  -Wb Free Diskobject       
  21. '  -Wb Erase Msgport     
  22. '
  23. Screen Open 0,640,256,2,$8000
  24. Curs Off : Cls 0 : Colour 1,$AAA
  25. '
  26. Amos To Back 
  27. '
  28. 'Equate définition 
  29. WBDISK=1
  30. WBDRAVER=2
  31. WBTOOL=3
  32. WBPROJECT=4
  33. WBGARBAGE=5
  34. WBDEVICE=6
  35. WBKICK=7
  36. WBAPPICON=8
  37. '
  38. 'Création du Port-Message
  39. MY_PORT=Wb Create Msgport
  40. If MY_PORT>0
  41.    'Réserver l'icône à utiliser   
  42.    D_OBJ=Wb Get Deficon(WBTOOL)
  43.    If D_OBJ>0
  44.       'Créer et afficher la AppIcon
  45.       APPICON=App Create Icon(D_OBJ,MY_PORT,"Phil-AppIcon"+Chr$(0))
  46.       If APPICON>0
  47.          MSG=Wb Get Msg(MY_PORT)
  48.          If MSG=$80000
  49.             'NumArg=0/DoubleClick else Number of Args. 
  50.             NUMARG=App Get Numarg
  51.             If NUMARG=0
  52.                Print "AppIcon activée..."
  53.             Else 
  54.                Print "Nombre de paramètre:";NUMARG
  55.                Print "Liste des Paramètres...";Chr$(10)
  56.                For T=1 To NUMARG
  57.                   ARGLIST$=App Get Arglist(T)
  58.                   Print "Argument n°";T;" >> ";Left$(ARGLIST$,30)
  59.                Next T
  60.             End If 
  61.          End If 
  62.          'Renvoyer le message à Intuition 
  63.          Wb Reply Msg 
  64.          'Libérer la AppIcon
  65.          App Free Icon APPICON
  66.       End If 
  67.       'Libérer l'icône réservée  
  68.       Wb Free Diskobject D_OBJ
  69.    End If 
  70.    'Libérer le Port-Message 
  71.    Wb Erase Msgport(MY_PORT)
  72. End If 
  73. '
  74. Amos To Front 
  75. Print Chr$(10);"Pressez une touche..."
  76. Wait Key 
  77.